Skip to content

feat(oxlint-config): check test files and titles with the vitest plugin - #216

Merged
dangreen merged 1 commit into
feat/oxlint-scoping-react-rulesfrom
feat/oxlint-vitest
Nov 25, 2026
Merged

dangreen merged 1 commit into
feat/oxlint-scoping-react-rulesfrom
feat/oxlint-vitest

Conversation

@dangreen

Copy link
Copy Markdown
Member

Stacked on #215.

The unit-tests skill's conventions, checked by oxlint's vitest plugin in the test config.

  • consistent-test-filename on every file: tests live in *.spec.* files, never in *.test.* ones.
  • On test files:
    • consistent-test-it: it, never test;
    • valid-title: an it title starts with should , and a describe holds one segment of the unit's address, so no /;
    • require-top-level-describe and prefer-importing-vitest-globals;
    • the plugin's correctness checks: no-focused-tests, no-disabled-tests, no-identical-title, no-standalone-expect, valid-describe-callback, valid-expect.
  • Not expect-expect: a test that asserts through a helper would need every helper's name in the config.

Measured: plant1t-web and this repo pass; nano_kit has 18 findings, conventional-changelog 46 (38 of them titles without should), simple-release 3.

🤖 Generated with Claude Code

@dangreen
dangreen added this pull request to stack #222 November 25, 2026 17:13
@dangreen
dangreen merged commit d096731 into main Nov 25, 2026
6 checks passed
@dangreen
dangreen deleted the feat/oxlint-vitest branch November 25, 2026 17:21
@github-actions github-actions Bot mentioned this pull request Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant